<html>

<style>
table {
  border-collapse: collapse;
  border-spacing: none;
  }

thead th {
  background-color: #F7BE81;
  font-size: 12px;
  font-family: sans-serif;
  border:none;
  }

tbody td {
  font-size: 12px;
}

tr td:first-child,
tr th:first-child {
      border-top-left-radius: 6px;
      border-bottom-left-radius: 6px;
}

tr td:last-child,
tr th:last-child {
  border-top-right-radius: 6px;
  border-bottom-right-radius: 6px;
}
</style>

<div ng-app="myApp" ng-controller="ListCustCtrl">
 <h3>Cancellation Master</h3> <!--class = "well" -->
 <form  novalidate name="UpdateCancForm" id="update-canc-form" method="post" action="">
  <table>
   <tr>
      <td>Date: </td>
	  <td><input type="date" ng-model="newcanceltblmast.Can_Date" required></td>
      <td>Agent Name: </td>
	  <td><select ng-model="clist" ng-options="cust.Name+' ('+cust.custtype+')' for cust in customermast " ></select> </td>
      <!--<td>Agent Name : <select ng-model="clist" ng-options="cust.Name+' ('+cust.custtype+')' for cust in customermast and "></select> -->
      <!-- "ng-options="type.name as type.name for type in custcat"></select>
       {{cust.custtype | json}} -->
        <td>PAX Name: </td>
		<td><input type="text" name="Pax_Name" ng-model="newcanceltblmast.Pax_Name" capitalize> </td>
        <!--   {{newcanceltblmast.Pax_Name | json}} -->
    </tr>
       
     <tr>
      <td>No of PAX:</td>
	  <td><input type="text" name="No_of_Pax" ng-model="newcanceltblmast.No_of_Pax"></td>
      <!--   {{newcanceltblmast.No_of_Pax | json}} -->
      <td>Airline: </td>
	  <td><input type="text" name="Airline" ng-model="newcanceltblmast.Airline" capitalize> </td>
       <td>Sector : </td>
	   <td><input type="text" name="Sector" ng-model="newcanceltblmast.Sector" capitalize> </td>
     </tr>
    
    <tr>
      <td>Net Rate:</td>
	  <td> <input type="text" name="Net_Rate" ng-model="newcanceltblmast.Net_Rate"></td>
      <td>Refund Amt: </td>
	  <td> <input type="text" name="Refund_Amt" ng-model="newcanceltblmast.Refund_Amt"></td>
      <td>Refund Date:  </td>
 	  <td> <input type="date" name="Refund_Date" ng-model="newcanceltblmast.Refund_Date"></td>
    </tr>
    
    <tr>
        <td>Agent Rate: </td>
		<td><input type="text" name="Agent_Rate" ng-model="newcanceltblmast.Agent_Rate"></td>
        <td>Agent Ref Amt: </td>
		<td><input type="text" name="Agent_Ref_Amt" ng-model="newcanceltblmast.Agent_Ref_Amt"></td>
        <td>Reference Date : </td>
		<td><input type="date" name="Reference_Date" ng-model="newcanceltblmast.Reference_Date"></td>
	</tr>
	
   </table>
   <!--<ng-disabled="UpdateCustForm.$invalid || isUnchanged(newcustomermast)" 
    <!-- <button class="btn btn-success" id="upt-exit-btn" ng-click="updtcustdata(newcustomermast)">Update</button> -->
    <a class="btn btn-success" href="#/updtcustdata/" ng-click="updtcustdata(newcanceltblmast)">Update</a>
    <a href="#/editcust/" ng-click="cancel()" class="btn">Cancel</a>
    <a class="btn btn-info pull-right" href="#/add-user">New Cancellation</a>
    <input type="text" ng-model="name" class="search-query" placeholder="Search">
     
       
<!-- <div ng-controller="ListCustCtrl"> -->
            <table class="table table-striped table-condensed table-hover">
                <thead>
                    <tr>
                         <!--<th class="id">Id&nbsp;<a ng-click="sort_by('Sr_NO')"><i class="icon-sort"></i></a></th>
                         <th class="name">Customer Name&nbsp;<a ng-click="sort_by('Name')"><i class="icon-sort"></i></a></th> 
                         <th><a href="" ng-click="predicate = 'Name'; reverse=!reverse">Customer Name</a></th>
                         <th class="address">Address&nbsp;<a ng-click="sort_by('Address')"><i class="icon-sort"></i></a></th>
                         <th class="city">City&nbsp;<a ng-click="sort_by('city')"><i class="icon-sort"></i></a></th>
                         <th class="phone">Phone&nbsp;<a ng-click="sort_by('phone')"><i class="icon-sort"></i></a></th>
                         <th class="email">Email&nbsp;<a ng-click="sort_by('email')"><i class="icon-sort"></i></a></th>
                         <th class="custtype">Type&nbsp;<a ng-click="sort_by('custtype')"><i class="icon-sort"></i></a></th>  -->
                         <th>Id</th>
                         <th>Date</th>
                         <th><a href="" ng-click="predicate = 'Name'; reverse=!reverse">Agent Name</a></th> 
                         <th>PAX Name</th>
                         <th>No of PAX</th>
                         <th>Airline</th>
                         <th>Sector</th>
                         <th>Net Rate</th>
                         <th>Refund Amt</th>
                         <th>Refund Date</th>
                         <th>Agent Rate</th>
                         <th>Agent Ref Amt</th>
                         <th>Ref Date</th>
                         <th>Comment</th>
                         <!--<th>Entered By</th>
                         <th>Entered Date</th>
                         <th>Status</th>-->
                         <th>Del</th>
                         <th>Edit</th>
                   </tr>
                </thead>
                <tbody>
                    <tr ng-repeat="item in canceltblmast | filter: name | orderBy:predicate:reverse | startingFrom:currentPage*pageSize | limitTo:pageSize">
                         <td>{{item.cantrndetid}}</td>
                         <td>{{item.Can_Date | date:'dd/MM/yyyy'}}</td>
                         <td>{{item.agentid}}</td>
                         <td>{{item.Pax_Name}}</td>      
                         <td>{{item.No_of_Pax}}</td> 
                         <td>{{item.Airline}}</td> 
                         <td>{{item.Sector}}</td> 
                         <td>{{item.Net_Rate | number:0}}</td> 
                         <td>{{item.Refund_Amt | number:0}}</td>
                         <td>{{item.Refund_Date |date:'dd/MM/yyyy' }}</td> 
                         <td>{{item.Agent_Rate | number:0}}</td> 
                         <td>{{item.Agent_Ref_Amt | number:0}}</td>
                         <td>{{item.Reference_Date| date:'dd/MM/yyyy'}}</td>
                         <td>{{item.Comment}}</td>
                       <!--  <td>{{item.enteredby}}</td>
                         <td>{{item.entrydt | date:'dd/MM/yyyy'}}</td> 
                         <td>{{item.status}}</td>-->
                         <td><a href="#/deletecust/" ng-click="deletecancel(item.cantrndetid)"> <img src="glyphicons_bin.png" alt="Delete"/></td> 
                    <!--     <td><a href="#/editcust/{{item.custid}}" ng-click="editcust(item.custid)"> <img src="glyphicons_edit.png" alt="Edit"/></td> -->
                         <td><a href="#/editcanc/" ng-click="edit(item.cantrndetid)"> <img src="glyphicons_edit.png" alt="Edit"/></td> 
                    </tr>
               </tbody>
              <!--  <tr ng-show="editId===item.custid" ng-if="editId===item.custid">
            <td colspan="7" ng-include src="'editRow.html'"></td>
        </tr>-->
			
            </table>
    <!-- <button ng-disabled="currentPage == 0" ng-click="currentPage=currentPage-1">Previous</button>
				{{currentPage+1}}/{{customermast.length/pageSize}}
				<button ng-disabled="currentPage >= customermast.length/pageSize - 1" ng-click="currentPage=currentPage+1">
				Next pagedItems
				</button> -->
               
             <tfoot>
             Current Page  {{currentPage+1}} of {{canceltblmast.length/pageSize}}
                    <td colspan="6">
                        <div class="pagination pull-right">
                            <ul>
                              <!--  <li ng-class="{disabled: currentPage == 0}">
                                    <a href ng-click="currentPage=currentPage-1">« Prev</a> 
                                </li>-->
                <button ng-disabled="currentPage == 0" ng-click="currentPage=currentPage-1"> « Prev </button>
                                
                         <li ng-repeat="n in range(canceltblmast.length)"
                                    ng-class="{active: n == currentPage}"
                                    ng-click="setPage()">
                                    <a href ng-bind="n + 1">1</a>
                                </li> 
                    <!--    <li ng-class="{disabled: currentPage >= customermast.length/pageSize - 1 }">
                                    <a href ng-click="currentPage=currentPage+1">Next »</a>  -->
        <button ng-disabled="currentPage >= canceltblmast.length/pageSize - 1" ng-click="currentPage=currentPage+1">
        Next »
    </button>
       </li>
      </ul>
    </div>
  </td>
  </tfoot>
       </div>  
  </body>
</html>
